<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>7.关于data写成函数这件事</title>
  </head>
  <body>
    <script type="text/javascript" >
      let data = function(){
        return {n:1}
      }

      const result = data()
      result.n = 9
      console.log(result.n)

      const result2 = data()
      console.log(result2.n)
     
    </script>
  </body>
</html>